<template>
<div class="slide-verify-bg">
  <slide-verify
    :l="42"
    :r="10"
    :w="460"
    :h="255"
    :show="false"
    slider-text="向右滑动完成验证"
    ref="slideverify"
    @success="onSuccess"
    @fail="onFail"
    @refresh="onRefresh"
  ></slide-verify>
</div>
</template>

<script>
export default { 
  name: "SliderVerify",
  data() { 
    return { 
    };
  },
  methods: { 
   
    onSuccess() { 
      this.onReset();
   //往父级传递验证通过的函数
      this.$emit("success");
    },
    onReset() { 
   //重置图片验证组件
      this.$refs.slideverify.reset();
    },
    onFail() { 
   },
    onRefresh() { 
   },
  },
};
</script>

<style lang="less" scoped>
.slide-verify-bg{
  padding: 20px;
  background-color: #fff;
}
</style>